package com.data.modules.feign;

import com.data.common.api.vo.CrmResult;
import com.data.common.entity.CrmSiteResultSearchBO;
import com.data.common.entity.LaborerParameter;
import com.data.common.entity.SalaryManagementVO;
import com.data.modules.contract.entity.vo.SettleSuppierRuleSiteVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Description
 * @Date 2022-2-22 10:43:47
 * @Author chj
 */
@Component
@FeignClient(name="crm", url = "${crm.crm-url:}")
public interface CrmService {

    @PostMapping(value="referrerSalary/refMoneyInfo")
    CrmResult<SalaryManagementVO> refMoneyInfo(@RequestBody LaborerParameter parameter);

    /**
     * databoot 发送bp提醒消息
     *
     */
    @PostMapping("/crmTaskSms/sendSms")
    CrmResult sendSms(@RequestBody CrmSiteResultSearchBO bo);

    /**
     * 统计结算周期内crm 上岗人数
     * @param settleScope
     * @return
     */
    @PostMapping("/crmCustomer/querySettleCrmNumInfo")
    CrmResult<List<SettleSuppierRuleSiteVo>> querySettleCrmNumInfo(@RequestBody String settleScope) ;

    /**
     * databoot 查询时间段内BP标记已上岗的人数
     *
     */
    @PostMapping("/crmCustomer/findBPStatusWorkCount")
    CrmResult<Integer> findBPStatusWorkCount(@RequestParam() String siteId, @RequestParam() String startTime, @RequestParam() String endTime);

}
